#ifndef _BIGIMG_H_
#define _BIGIMG_H_

#include <filesystem.h>
#include <stdio.h>


#define MAP_TILES_X 9
#define MAP_TILES_Y 7
#define TILE_W 32
#define TILE_H 32
#define TILE_COLOR_SZ 2
#define TILE_SIZE_BYTES TILE_W*TILE_H*TILE_COLOR_SZ

typedef struct
{
  FILE *f;
  int tileX;
  int tileY;
  int sx;
  int sy;
  int widthInTiles;
  int heightInTiles;
  int textures[MAP_TILES_X*MAP_TILES_Y];
  char loaded[MAP_TILES_X*MAP_TILES_Y];
} BigImage;

void scrollTilesLeft(BigImage *img);
void scrollTilesRight(BigImage *img);
void scrollTilesUp(BigImage *img);
void scrollTilesDown(BigImage *img);
BigImage *createBigImage(char *fname, int tilesW, int tilesH);
void drawImg(BigImage *img);
void loadTextures(BigImage *img);
void scrollTo(BigImage *img, int x, int y);

#endif

